//
//  DetailPersonViewController.m
//  Frame
//
//  Created by 这是工作本 on 16/1/4.
//  Copyright © 2016年 这是工作本. All rights reserved.
//

#import "DetailPersonViewController.h"

@interface DetailPersonViewController ()<UIGestureRecognizerDelegate>

@property (nonatomic, retain) UIImageView *backIV;
@end

@implementation DetailPersonViewController

- (void)viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"个人中心";
    self.view.backgroundColor = [UIColor whiteColor];
//    self.navigationController.navigationBar.barTintColor = [UIColor orangeColor];
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:20 / 255.0 green:20 / 255.0  blue:20 / 255.0  alpha:1.0];
  
    
    
    self.backIV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 64)];
    self.backIV.userInteractionEnabled = YES;
    self.backIV.image = [UIImage imageNamed:@"IMG_0006.jpg"];
    [self.view addSubview:self.backIV];
    
    //添加全屏右滑动手势
    id target = self.navigationController.interactivePopGestureRecognizer.delegate;
    // 创建全屏滑动手势，调用系统自带滑动手势的target的action方法
    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:target action:@selector(handleNavigationTransition:)];
    // 设置手势代理，拦截手势触发
    pan.delegate = self;
    // 给导航控制器的view添加全屏滑动手势
    [self.view addGestureRecognizer:pan];
    // 禁止使用系统自带的滑动手势
    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    
    self.tabBarController.tabBar.hidden = YES;
    
    
}

- (void)handleNavigationTransition:(UIPanGestureRecognizer *)sender
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
